Skip to content

Fix format_trace_id and format_span_id docstrings #4570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025

Conversation

mattyding
Copy link
Contributor

Description

The two docstrings I updated are incorrect and confused me while implementing otel spec. Per other docs, it looks like trace ID and span ID are intended to be 16-bytes and 8-bytes, respectively. The behavior of the format method in Python as implemented is to create a length N hexstring, which corresponds to N/2 bytes of data.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • This change requires a documentation update

I originally found this docstring by linking from the Python SDK documentation here

How Has This Been Tested?

N/A - documentation fix

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@mattyding mattyding requested a review from a team as a code owner May 7, 2025 16:09
Copy link

linux-foundation-easycla bot commented May 7, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mattyding / name: Matthew Ding (3f25e53, 51a87d0)
  • ✅ login: xrmx / name: Riccardo Magliocchetti (e9c308a)

@emdneto emdneto closed this May 26, 2025
@emdneto emdneto reopened this May 26, 2025
@xrmx xrmx added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 27, 2025
@xrmx xrmx enabled auto-merge (squash) May 27, 2025 09:24
@xrmx xrmx merged commit 6ea3c0f into open-telemetry:main May 27, 2025
478 of 480 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants